package com.ruoyi.info.controller;

import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.health.domain.ServiceType;
import com.ruoyi.health.service.IServiceItemService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * 服务项目Controller
 * 
 * @author dalian
 * @date 2023-08-08
 */
@RestController
@RequestMapping("/info/healthServiceItem")
public class FrontServiceItemController extends BaseController
{
    @Autowired
    private IServiceItemService serviceItemService;

    /**
     * 查询服务项目列表（可根据服务类型查询）
     */
    @GetMapping("/list")
    public TableDataInfo list(ServiceType serviceType) {
        //不分页，查全部或根据服务类型查
        List<ServiceType> list = serviceItemService.selectServiceTypeList(serviceType);
        return getDataTable(list);
    }


}
